package com.fishery.quartz.config;

import org.quartz.Scheduler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;


/**
 * Quartz配置
 */
@Configuration
public class QuartzConfig {

	@Autowired
	private SchedulerFactoryBean schedulerFactoryBean;


	@Bean(value = "myScheduler")
	public Scheduler schedulerFactoryBean() {
		return schedulerFactoryBean.getScheduler();
	}



}
